<template>
<!-- 头部 导航栏 组件 -->
  <van-nav-bar
    class="orderhead"
    :title="title"
    left-arrow
    @click-left="onClickLeft"
  />
</template>

<script>
import { NavBar, Toast } from "vant";
export default {
  name: "OrderHead",
  components: {
    [NavBar.name]: NavBar,
    [Toast.name]: Toast,
  },
  props: ["title"],
  methods: {
    onClickLeft() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="less">
.orderhead {
  background-color: #3190e8;

  .van-nav-bar__title,
  .van-icon::before {
    color: white;
    font-size: 20px;
  }
}
</style>